var uname = $.cookie('petname')
var filename=$.cookie('question')
if(uname){
		$('#login').find('span').last().text(uname)
}
$('#zz').click(function(){
//	var uname = $.cookie('petname')
//	var datas=$('textarea').serialize()
	var obj={
		question:filename,
		content:$('textarea').val(),
		petname:uname
	}
	$.post({
		url:'/answer',
		data:obj,
		success:function(data){
			if (data.code = 'success') {
				alert(data.message)
				location.href='index.html'
			} else{
				alert(data.message)
		}
		
	}
})
})
